///**
// * 
// */
//package com.cmcc.aregister.cs.util;
//
//import java.io.Serializable;
//import java.util.List;
//
//import com.cmcc.aregister.cs.model.Department;
//import com.cmcc.aregister.cs.model.Doctor;
//import com.cmcc.aregister.cs.model.Hospital;
//
///**
// * @author shenwangqiang
// * @version 创建时间：2011-12-10 下午06:23:37
// * 
// */
//public class ChangeListenerImpl implements ChangeListener, Serializable {
//	/**
//	 * 
//	 */
//	private static final long serialVersionUID = 8751170877439033968L;
//	private static ChangeListener sInstance;
//	private List<Hospital> hospitalList;
//	private List<Department> departmentList;
//	private List<Doctor> doctorList;
//
//	private ChangeListenerImpl(List<Hospital> hospitalList,
//			List<Department> departmentList, List<Doctor> doctorList) {
//		this.hospitalList = hospitalList;
//		this.departmentList = departmentList;
//		this.doctorList = doctorList;
//	}
//
//	public static ChangeListener getInstance(List<Hospital> hospitalList,
//			List<Department> departmentList, List<Doctor> doctorList) {
//		if (sInstance == null) {
//			sInstance = new ChangeListenerImpl(hospitalList, departmentList,
//					doctorList);
//		}
//		return sInstance;
//	}
//
//	@Override
//	public void changeHospital(Hospital hospital, int position) {
//		if (hospital != null && hospitalList.size() > position) {
//			hospitalList.set(position, hospital);
//		}
//	}
//
//	@Override
//	public void changeDepartment(Department department, int position) {
//		if (department != null && departmentList.size() > position) {
//			departmentList.set(position, department);
//		}
//	}
//
//	@Override
//	public void changeDoctor(Doctor doctor, int position) {
//		if (doctor != null && doctorList.size() > position) {
//			doctorList.set(position, doctor);
//		}
//	}
//
//	@Override
//	public void changeHospital(int position) {
//		if (hospitalList.size() > position) {
//			hospitalList.remove(position);
//		}
//	}
//
//	@Override
//	public void changeDepartment(int position) {
//		if (departmentList.size() > position) {
//			departmentList.remove(position);
//		}
//	}
//
//	@Override
//	public void changeDoctor(int position) {
//		if (doctorList.size() > position) {
//			doctorList.remove(position);
//		}
//	}
//
// }
